package com.jrh.dal;

import java.util.List;

import com.jrh.domain.entity.AtlasDetail;

/**
 * 美图集详情
 * 
 * @author jasen.hsu.cn@gmail.com 2012-7-23 下午1:24:02
 */
public class AtlasDetailDao extends BaseDao<AtlasDetail> {

    public AtlasDetailDao(){
        this.namespace = "jrh.single.atlasDetail";
    }

    @SuppressWarnings("unchecked")
    public List<AtlasDetail> listByAtlasId(Long atlasId) {
        return (List<AtlasDetail>) sqlMapClientTemplate.queryForList(namespace + "." + "listByAtlasId", atlasId);
    }

    /**
     * 根据美图集ID删除详情
     * 
     * @param atlasId
     */
    public void deleteByAtlasId(Long atlasId) {
        sqlMapClientTemplate.delete(namespace + "." + "deleteByAtlasId", atlasId);
    }
}
